﻿using System;
namespace Xtee.XteeClient.Ehma10000000 {
    using Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000;
    using Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages;
    using global::Xtee.Core;
    using System.Collections.Generic;
    
    
    public class Ehma10000000Adapter {
        
        private string _producer = "ehma-10000000";
        
        private string _toimik;
        
        private string _allAsutus;
        
        private string _amet;
        
        private string _ametnikNimi;
        
        private string _autentija;
        
        private string _ametnik;
        
        private Xtee.Core.Client.IXteeCommand _xteeCommand;
        
        public Ehma10000000Adapter() : 
                this(new Xtee.Core.Client.XteeCommand(new Xtee.Core.Client.Config.Configuration())) {
        }
        
        public Ehma10000000Adapter(Xtee.Core.Client.IXteeCommand command) {
            this._xteeCommand = command;
            if (!string.IsNullOrEmpty(_xteeCommand.Configuration.AlternateProducer)) {
                this._producer = _xteeCommand.Configuration.AlternateProducer;
            }
        }
        
        public virtual string Producer {
            get {
                return this._producer;
            }
            set {
                this._producer = value;
            }
        }
        
        public virtual string Toimik {
            get {
                return this._toimik;
            }
            set {
                this._toimik = value;
            }
        }
        
        public virtual string AllAsutus {
            get {
                return this._allAsutus;
            }
            set {
                this._allAsutus = value;
            }
        }
        
        public virtual string Amet {
            get {
                return this._amet;
            }
            set {
                this._amet = value;
            }
        }
        
        public virtual string AmetnikNimi {
            get {
                return this._ametnikNimi;
            }
            set {
                this._ametnikNimi = value;
            }
        }
        
        public virtual string Autentija {
            get {
                return this._autentija;
            }
            set {
                this._autentija = value;
            }
        }
        
        public virtual string Ametnik {
            get {
                return this._ametnik;
            }
            set {
                this._ametnik = value;
            }
        }
        
        public virtual Xtee.Core.Client.IXteeCommand XteeCommand {
            get {
                return this._xteeCommand;
            }
            set {
                this._xteeCommand = value;
            }
        }
        
        public virtual string KonstrueeriTeenuseNimi(string teenuseNimi, string versioon) {
            return string.Format("{0}.{1}.{2}", this.Producer, teenuseNimi,versioon);
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IOmaList EHMAOMA(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAOMA", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAOMA", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IOmaVastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IOmlList EHMAOML(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAOML", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAOML", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IOmlVastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IKam1List EHMAKAM1(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAKAM1", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAKAM1", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IKam1VastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.ITur1List EHMATUR1(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMATUR1", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMATUR1", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.ITur1VastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.ITur3List EHMATUR3(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMATUR3", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMATUR3", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.ITur3VastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IOmt1List EHMAOMT1(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAOMT1", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAOMT1", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IOmt1VastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaManusegaValjund EHMAKAM2(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAKAM2", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAKAM2", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IEhmaManusegaVastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaManusegaValjund EHMATUR2(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMATUR2", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMATUR2", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IEhmaManusegaVastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaManusegaValjund EHMAOMT2(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemik keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAOMT2", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAOMT2", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IEhmaManusegaVastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IAtm1List EHMAATM1(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguPaev keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAATM1", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAATM1", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage2(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IAtm1VastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IAtm2List EHMAATM2(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguPaev keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAATM2", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAATM2", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage2(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IAtm2VastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IAtm3 EHMAATM3(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguFail keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAATM3", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAATM3", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage3(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IAtm3VastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IMlrList EHMAMLR(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguPaev keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAMLR", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAMLR", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.EhmaParingMessage2(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IMlrVastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaManusegaValjund EHMAAUDIT(global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.IEhmaParinguVahemikTeenusega keha) {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "EHMAAUDIT", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("EHMAAUDIT", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.AuditParingMessage(keha)));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IAuditVastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual System.Collections.Generic.List<System.String> ListMethods() {
            global::Xtee.Core.Envelope.ISoapEnvelope responseEnvelope = _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "listMethods", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("listMethods", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.ListMethodsMessage()));
            return ((global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.IListMethodsVastusMessage)(responseEnvelope.Body)).Keha;
        }
        
        public virtual void TestSystem() {
            _xteeCommand.Execute(new global::Xtee.Core.Envelope.SoapEnvelope("http://producers.ehma-10000000.xtee.riik.ee/producer/ehma-10000000", "testSystem", new Xtee.Core.Envelope.StandardHeader(_xteeCommand.Configuration.Asutus, this.Producer, _xteeCommand.Configuration.Isikukood, Xtee.Core.Utils.StringUtils.GenerateNonce(), this.KonstrueeriTeenuseNimi("testSystem", "v1"), this.Toimik, this.AllAsutus, this.Amet, this.AmetnikNimi, this.Autentija), new global::Producers.Ehma10000000.Xtee.Riik.Ee.Producer.Ehma10000000.Messages.TestSystemMessage()));
        }
    }
}
